<?php
echo 12345, "\n";//十进制整数
echo 012, "\n";//以0开头，后边是0-7,8进制整数
echo 0o32, "\n";//以0o开头，后边是0-7,8进制整数
echo 0b1101, "\n";//以0b开头，后边是0-1,2进制整数
echo 0x49A, "\n";//以0x开头，后边是0-9A-F,16进制整数,所有字母不区分大小写
//算术运算符
echo 8/5,"\n";
echo intdiv(8,5),"\n";//只有整数部分
echo 8%5, "\n";//两个整数相除取余数
echo @(8.1%5.9), "\n";//两个整数相除取余数,@用来抑制警告信息
echo (int)8.1 % (int)5.9, "\n";//两个整数相除取余数,明确强制类型转换
echo fmod(8,5), "\n";//3.6
echo 2 ** 3,"\n";//2的3次方
//和其他类型的数据进行运算

echo 12 + 3.5, "\n"; //转换为float进行计算
echo 1200 + "12abc", "\n"; //"12abc"以数字开头，转换为12，结果1212
echo 1200 + "3e4yy", "\n"; //"3e4yy"3乘以10的4次方，准换为30000，结果为31200
//echo 1200+"","\n"; //"abc12"不以数字开头，错误
echo 1200+true,"\n";//true转换为整数1，结果1201
echo false+1200,"\n";//false转换为整数0，结果1200
echo null+1200,"\n";//null转换为整数0